#include "star.h"
#include"file.h"
star::star() {
    m_star.load(":/star.png");


    m_x = 0;
    m_y = 0;
    m_rect.setWidth(m_star.width());
    m_rect.setHeight(m_star.height());
    m_rect.moveTo(m_x, m_y);
    m_free = true;
    m_speed = 2;
}
void star::updatePosition()
{

    if(m_free)
    {
        return;
    }


    m_y += m_speed;
    m_rect.moveTo(m_x, m_y);


    if(m_y >= GAME_HEIGHT)
    {
        m_free = true;
    }
}
